A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics
نویسندگان
چکیده
The most popular lines clipping algorithms are Cohen-Sutherland and Liang-Barsky line clipping algorithm. These algorithms are complex and the steps of calculation are very high. This paper proposes a simple new line clipping algorithm for 2D space which uses the parametric equation of the line. This algorithm further easily extended to the polygon clipping by considering the edge of the polygon as a line. The proposed algorithm is numerically tested for a numbers of random line segments and the results show the simplicity and less complex behavior of the algorithm.
منابع مشابه
An efficient algorithm for line clipping by convex polygon
-A new line clipping algorithm against convex window based on a new approach for intersection detection is presented. Theoretical comparisons with Cyrus-Beck's algorithm are shown together with experimental results obtained by simulations. The main advantage of the presented algorithm is the substantial acceleration of the line clipping problem solution and that edges can be oriented clockwise ...
متن کاملLine clipping in E2 with O(1) processing complexity
A new algorithm for line clipping by convex polygon with O( ) 1 processing complexity is presented. It is based on dual space representation and space subdivision technique. The suggested algorithm also demonstrates that pre-processing can be used in order to speed up solution of some problems in computer graphics applications significantly. Theoretical considerations and experimental results a...
متن کاملEfficient Triangle and Quadrilateral Clipping Within Shaders
Clipping a triangle or a convex quadrilateral to a plane is a common operation in computer graphics. This clipping is implemented by fixed-function units within the graphics pipeline under most rasterization APIs. It is increasingly interesting to perform clipping in programmable stages as well. For example, to clip bounding volumes generated in the Geometry unit to the near plane, or to clip a...
متن کاملAccelerating Polygon Clipping
Polygon clipping is a central part of image generation and image visualization systems. In spite of its algorithmic simplicity it consumes a considerable amount of hardware or software resources. Polygon clipping performance is dominated by two processes: intersection calculations and data transfers. The paper analyzes the prevalent Sutherland-Hodgman algorithm for polygon clipping and identifi...
متن کاملAlgorithm for finding the largest inscribed rectangle in polygon
In many industrial and non-industrial applications, it is necessary to identify the largest inscribed rectangle in a certain shape. The problem is studied for convex and non-convex polygons. Another criterion is the direction of the rectangle: axis aligned or general. In this paper a heuristic algorithm is presented for finding the largest axis aligned inscribed rectangle in a general polygon. ...
متن کامل